import VueRouter from 'vue-router'

//导入对应的路由组件
import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import NewList from './components/news/newList.vue'
import newsinfo from './components/news/newsInfo.vue'
import photolist from './components/photos/photolist.vue'
import photoinfo from './components/photos/photoinfo.vue'
import goodslist from './components/goodslist/goodslist.vue'
import goodsinfo from './components/goodslist/goodsinfo.vue'
import goodsdesc from './components/goodslist/goodsdesc.vue'
import goodscomment from './components/goodslist/goodscomment.vue'


var router = new VueRouter({
    routes:[ //配置路由规则
        { path:'/',redirect:'/home' },
        { path:'/home',component:HomeContainer },
        { path:'/member',component:MemberContainer },
        { path:'/shopcar',component:ShopcarContainer },
        { path:'/search',component:SearchContainer },
        { path:'/home/newlist',component:NewList },
        { path:'/home/newsinfo/:id',component:newsinfo },
        { path:'/home/photolist',component:photolist },
        { path:'/home/photoinfo/:t',component:photoinfo },
        { path:'/home/goodslist',component:goodslist },
        { path:'/home/goodsinfo/:goodsId',component:goodsinfo ,name:'goodsinfo'},
        { path:'/home/goodsdesc/:goodsId',component:goodsdesc ,name:'goodsdesc'},
        { path:'/home/goodscomment/:goodsId',component:goodscomment ,name:'goodscomment'}
        

    ],
    linkActiveClass:'mui-active' //用此方法设置点击高亮 mui-active为MUI里的类的属性
})

export default router
//把routereee暴露出去